#include<stdio.h>

int main()
{
	char str[100];
	FILE * fp;
	fp = fopen("fscanf.txt", "w");
	fprintf(fp,"%s %s %s %s %s","I", "am", "a", "hard-working", "person");
	fclose(fp);

	fp = fopen("fscanf.txt","r");
	char str1[10],str2[10],str3[10],str4[10];
	fscanf(fp,"%s %s %s %s", str1,str2,str3,str4);
	printf("%s\n",str1);
	printf("%s\n",str2);
	printf("%s\n",str3);
	printf("%s\n",str4);
	fclose(fp);
	return 0;
}
